<!DOCTYPE html>
<!-- Template Name: Rapido - Responsive Admin Template build with Twitter Bootstrap 3.x Version: 1.0 Author: ClipTheme -->
<!--[if IE 8]><html class="ie8" lang="en"><![endif]-->
<!--[if IE 9]><html class="ie9" lang="en"><![endif]-->
<!--[if !IE]><!-->
<html lang="en">
	<!--<![endif]-->
	<!-- start: HEAD -->
	<head>
		<title>后台管理</title>
		<!-- start: META -->
		<meta charset="utf-8" />
		<!--[if IE]><meta http-equiv='X-UA-Compatible' content="IE=edge,IE=9,IE=8,chrome=1" /><![endif]-->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta content="" name="description" />
		<meta content="" name="author" />
		<!-- end: META -->
		<!-- start: MAIN CSS -->
		<link rel="stylesheet" href="/plugins/bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="/plugins/iCheck/skins/all.css">
		<link rel="stylesheet" href="/plugins/perfect-scrollbar/src/perfect-scrollbar.css">
		<link rel="stylesheet" href="/plugins/animate.css/animate.min.css">
		<link rel="stylesheet" href="/css/styles.css">
		<link rel="stylesheet" href="/css/styles-responsive.css">
		<link rel="stylesheet" href="/css/plugins.css">
		<link rel="stylesheet" href="/css/themes/theme-default.css" type="text/css" id="skin_color">
		<link rel="stylesheet" href="/css/print.css" type="text/css" media="print"/>
        <link rel="stylesheet" href="/plugins/SweetAlert/sweetalert.css" />
        <link rel="stylesheet" href="/plugins/jquery-ui-1.11.4/jquery-ui.css" />
        <link rel="stylesheet" href="/plugins/datetimepicker/css/bootstrap-datetimepicker.css" />
        <link rel="stylesheet" href="/plugins/fileinput/css/fileinput.min.css" />
		<link rel="stylesheet" href="/plugins/medialog/mdialog.css">
		<link rel="stylesheet" href="/viewer/viewer.css/viewer.min.css">
		<!-- end: CORE CSS -->
		<link rel="shortcut icon" href="/images/favicon.ico" />
        <script src="/plugins/jQuery/jquery-2.1.1.min.js"></script>
        <script src="/js/fakeloader.min.js"></script>
        <script type="text/javascript" src="/viewer/viewer.js"></script>
	</head>
	<body>

		<!-- end: SLIDING BAR -->
		<div class="main-wrapper">
			<!-- start: TOPBAR -->
			<header class="topbar navbar navbar-inverse navbar-fixed-top inner">
				<!-- start: TOPBAR CONTAINER -->
				<div class="container">
					<div class="navbar-header">
						<a class="sb-toggle-left hidden-md hidden-lg" href="#main-navbar">
							<i class="fa fa-bars"></i>
						</a>
						<!-- start: LOGO -->
						<a class="navbar-brand" href="javascript:void(0);">
							<img src="/images/admin/logo.png" alt="Rapido"/>
						</a>
						<!-- end: LOGO -->
					</div>
					<div class="topbar-tools">
						<!-- start: TOP NAVIGATION MENU -->
						<ul class="nav navbar-right">
							<!-- start: USER DROPDOWN -->
							<li class="dropdown current-user">
								<a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" data-close-others="true" href="#">
                                <img src="/images/admin/avatar-1-small.jpg" class="img-circle" alt=""> <span class="username hidden-xs"><?=$_SESSION['user']['name']?></span> <i class="fa fa-caret-down "></i>
								</a>
								<ul class="dropdown-menu dropdown-dark">
									<li>
                                    <a href="/admin_login/edit?id=<?=$_SESSION['user']['id']?>">
										    修改密码	
										</a>
									</li>
									<li>
										<a href="/admin_login/quit">
											退出
										</a>
									</li>
								</ul>
							</li>
						</ul>
						<!-- end: TOP NAVIGATION MENU -->
					</div>
				</div>
				<!-- end: TOPBAR CONTAINER -->
			</header>
			<!-- end: TOPBAR -->
			<!-- start: PAGESLIDE LEFT -->
			<a class="closedbar inner hidden-sm hidden-xs" href="#">
			</a>
			<nav id="pageslide-left" class="pageslide inner">
				<div class="navbar-content">
					<!-- start: SIDEBAR -->
					<div class="main-navigation left-wrapper transition-left">
						<div class="navigation-toggler hidden-sm hidden-xs">
							<a href="#main-navbar" class="sb-toggle-left">
							</a>
						</div>
						<div class="user-profile border-top padding-horizontal-10 block">
							<div class="inline-block">
								<img src="/images/admin/avatar-1.jpg" alt="">
							</div>
							<div class="inline-block">
								<h5 class="no-margin"> 欢迎 </h5>
                                <h4 class="no-margin"><?=$_SESSION['admin']['name']?></h4>
								<a class="btn user-options sb_toggle hidden">
									<i class="fa fa-cog"></i>
								</a>
							</div>
						</div>
						<!-- start: MAIN NAVIGATION MENU -->
						<ul class="main-navigation-menu">
                            <?foreach($_SESSION['admin']['tPDatas'] as $tMRow){?>
                            <?if($tMRow['url'] == 'app' && (in_array($tMRow['url'],$_SESSION['admin']['uri']) || $_SESSION['admin']['role'] == 'admin')){?>
                            <li>
								<a href="#"><i class="fa fa-star"></i> <span class="title">app管理 </span><i class="icon-arrow"></i> </a>
								<ul class="sub-menu">
                                    <?foreach($_SESSION['admin']['tCDatas'][$tMRow['id']] as $tCRow){?> 
                                    <li>
                                    <a href="/<?=$tCRow['url']?>"><?=$tCRow['name']?></a>
                                    </li>
                                    <?}?>
								</ul>
							</li>
                            <?}elseif(in_array($tMRow['url'],$_SESSION['admin']['uri']) || $_SESSION['admin']['role'] == 'admin'){?>
                            <li>
                            <a href="/<?=$tMRow['url']?>"><i class="fa fa-star"></i><span class="title"><?=$tMRow['name']?></span></a>
                            </li>
                            <?}?>
                            <?}?> 
						</ul>
						<!-- end: MAIN NAVIGATION MENU -->
					</div>
					<!-- end: SIDEBAR -->
				</div>
			</nav>
